import { projectTypeArr, nucleicAcidTypeArr, sampleTypeArr, platformTypeArr, reasonNameArr,outsourcersArr, professionalArr,barcodeCodeList} from "@/api/commonArr/index.js"
let Arr = {
  reasonNameArr:[],
}
projectTypeArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {
  Arr.projectTypeArr = res.rows
})
nucleicAcidTypeArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {
  Arr.nucleicAcidTypeArr = res.rows
})
sampleTypeArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {
  Arr.sampleTypeArr = res.rows
})
platformTypeArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {
  Arr.platformTypeArr = res.rows
})
reasonNameArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {  
  res.rows.forEach(el=>{
    if (el.reasonType==0) {
      Arr.reasonNameArr.push(el) 
    }  
  })
})
outsourcersArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {
  Arr.outsourcersArr = res.rows 
})
professionalArr({
  pageNum: 1,
  pageSize: 999
}).then(res => {
  Arr.professionalArr = res.rows
})
// barcodeCodeList({
//   pageNum: 1,
//   pageSize: 9999
// }).then(res=>{
//   res.rows.forEach(el=>{
//     Arr.barcodeCodeList.push({value:el.barcodeCode})
//   })

// })


let arr = {
  experimentalStatusArr: [
    { value: 0, label: '未符合要求' },
    { value: 1, label: '符合要求' }
  ],

  entryStateArr: [
    { value: 0, label: "待入库" },
    { value: 1, label: "已入库" }
  ],

  isMixArr: [
    { value: 0, label: "否" },
    { value: 1, label: "是" }
  ],
  registerStateArr: [
    { value: 0, label: "未登记" },
    { value: 1, label: "已登记" }
  ],
  receiveStatusArr: [
    { value: 0, label: "不合格" },
    { value: 1, label: "合格" }
  ],
  isOutsourcersArr: [
    { value: 0, label: '否' }, { value: 1, label: '是' }
  ],
  dictReasonIdArr: [
    { value: 0, label: '废物1' }, { value: 1, label: '废物2' }
  ],
  qualityControlStatusArr: [
    { value: 0, label: "不合格" },
    { value: 1, label: "合格" }
  ],
  extractStateArr:[
    { value: 0, label: "待提取" },
    { value: 1, label: "已提取" }
  ],
  buildStateArr:[
    { value: 0, label: "待建库" },
    { value: 1, label: "已建库" }
  ],
  sequencingStateArr:[
    { value: 0, label: "待测序" },
    { value: 1, label: "已测序" }
  ],
  sequencingRunStatusArr:[
    { value: 0, label: "不正常" },
    { value: 1, label: "正常" }
  ],
  analyzeStateArr:[
    { value: 0, label: "待分析" },
    { value: 1, label: "分析中" },
    { value: 2, label: "分析失败" },
    { value: 3, label: "分析成功" }
  ],
  sampleStateArr:[
    { value: 0, label: "待分析" },
    { value: 1, label: "分析中" },
    { value: 2, label: "分析失败" },
    { value: 3, label: "分析成功" }
  ],


  registerStateObj: {
    0: "未登记",
    1: "已登记"
  },
  receiveStatusObj: {
    0: '不合格',
    1: '合格'
  },
  sampleStateObj: {
    0: '已录入',
    1: '已登记'
  },
  extractStateObj:{
    0:'待提取',
    1:'已提取'
  },
  buildHouseStateObj:{
    0:'待建库',
    1:'已建库'
  },
  sequencingStateObj:{
    0:'待测序',
    1:'已测序'
  },
  analyzeStateObj:{
    0:'待分析',
    1:'分析中',
    2:'分析失败',
    3:'分析成功'
  },
  mainStateObj: {
    1: "已录入",
    2: "已登记",
    3: "已入库",
    4: "已提取",
    5: "已建库",
    6: "已测序",
    7: "已分析",
    8: "已初审",
    9: "已确认初审",
    10: "已复审",
    11: "已提交",
    12: "已上传",
    13: "不上传"
  },


}
window.sessionStorage.setItem('arr',JSON.stringify(arr))
// window.sessionStorage.setItem('Arr',JSON.stringify(Arr))
export { arr, Arr }